﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleBehaviorTreeLibrary
{
    internal class IsEnemyNear : Condition
    {
        public override RunResult Run(Blackboard blackboard)
        {
            Console.WriteLine("Is enemy near? Checking...");
            
            if (blackboard.EnemyIsNear)
            {
                Console.WriteLine("Enemy is near.");

                return RunResult.Success;
            }
            
            Console.WriteLine("Can't find enemy.");

            return RunResult.Failure;
        }
    }
}
